package com.eh.model;

import com.eh.base.BaseModel;

/**
 * Created by David Li on 2016/5/10.
 */
public class User extends BaseModel {
    private String id;
    private String name;
    private int age;
    private Long companyId;
    private String group;

    public static class Builder {
        private String id;
        private String name;
        private int age;
        private Long companyId;
        private String group;

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder name(String name) {
            this.name = name;
            return this;
        }

        public Builder age(int age) {
            this.age = age;
            return this;
        }

        public Builder companyId(Long companyId) {
            this.companyId = companyId;
            return this;
        }

        public Builder group(String group) {
            this.group = group;
            return this;
        }

        public User build() {
            return new User(this);
        }
    }

    private User(Builder builder) {
        this.id = builder.id;
        this.name = builder.name;
        this.age = builder.age;
        this.companyId = builder.companyId;
        this.group = builder.group;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public String getGroup() {
        return group;
    }
}
